<?php

class tsw_tempRecordHigh implements ThermdSingleWidget
{
  public function drawWidget($io,$x,$y)
  {	
    $hot = imagecolorallocate($io,255,148,0);
    $black = imagecolorallocate($io,0,0,0);
    $icon = imagecreatefrompng(ThermdStats::$thermosrc.'record-high.png');

		$max = ThermdStats::ts_readAllTimeMax(ThermdStats::$temperature_log_id);
		imagestring($io,4,$x+115,$y+6,$max[1].ThermdStats::$units,$hot);
    imagestring($io,1,$x+13,$y+5,"RECORD HIGH",$black);
    imagestring($io,1,$x,$y+13,$max[0],$black);
    imagecopy($io,$icon,$x+86,$y,0,0,24,24);
  }
}

?>